'''
bloom filter algorithm implemented in python
 

@author: jadesoul
Created on 2010-11-26
'''

import random


h={}

for i in range(1, 300001):
	h["www.jadesoul%d.com" % i]=1
	if i%100000==0:print i
	
print "init ok", len(h)

for i in range(100):
	key=random.randint(1, 600000)
	if "www.jadesoul%d.com" % key in h:
		print i, "[", key , "] exist"
	else:
		print i, "[", key , "] not exist"

